package com.example.demo.service;

import com.example.demo.mapper.GoodMapper;
import com.example.demo.pojo.Good;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description:
 * @Param:
 * @Author:
 * @Date:
 */
@Service
public class GoodService {

    @Autowired
    private GoodMapper goodMapper;

    public List<Good> findGoods() {

        return goodMapper.findGoods();
    }

    public void delGood(Good good) {
        good.setStatus("1");
        goodMapper.delGood(good);
    }

    public void insertGood(Good good) {
        good.setStatus("0");
        goodMapper.insertGood(good);
    }
}
